package com.misic.wed;

import com.misic.service.RankService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class RankController {
    @Autowired
    private RankService rankService;
    /**
     * 计算平均分
     */
    @GetMapping(value = "/rank")
    public int rankOfSongListId(@RequestParam("songListId")Integer songListId){
//        String songListId = request.getParameter("songListId");
        return rankService.rankOfSongListId(songListId);
    }
}
